﻿using System;
using System.ComponentModel.DataAnnotations;

namespace easyccms.BusinessLayer.Entities
{
    /// <summary>
    /// Class representing Menu Item
    /// </summary>
    public class MenuItem : Entity
    {
        /// <summary>
        /// Gets or sets the menu item id.
        /// </summary>
        /// <value>
        /// The menu item id.
        /// </value>
        public virtual int MenuItemId { get; set; }

        /// <summary>
        /// Gets or sets the menu.
        /// </summary>
        /// <value>
        /// The menu.
        /// </value>
        public virtual Menu Menu { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        [Required]
        public virtual string Name { get; set; }

        /// <summary>
        /// Gets or sets the item order.
        /// </summary>
        /// <value>
        /// The item order.
        /// </value>
        public virtual int ItemOrder { get; set; }

        /// <summary>
        /// Gets or sets the external URL.
        /// </summary>
        /// <value>
        /// The external URL.
        /// </value>
        public virtual string ExternalUrl { get; set; }

        /// <summary>
        /// Gets or sets the created.
        /// </summary>
        /// <value>
        /// The created.
        /// </value>
        public virtual DateTime Created { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="MenuItem"/> is deleted.
        /// </summary>
        /// <value>
        ///   <c>true</c> if deleted; otherwise, <c>false</c>.
        /// </value>
        public virtual bool Deleted { get; set; }

        /// <summary>
        /// Gets or sets the display until.
        /// </summary>
        /// <value>
        /// The display until.
        /// </value>
        public virtual DateTime? DisplayUntil { get; set; }

        /// <summary>
        /// Gets or sets the article.
        /// </summary>
        /// <value>
        /// The article.
        /// </value>
        public virtual Article Article { get; set; }

        /// <summary>
        /// Gets or sets the author.
        /// </summary>
        /// <value>
        /// The author.
        /// </value>
        public virtual SiteUser User { get; set; }
    }
}
